//
//  ErCodeViewController.m
//  EDPS
//
//  Created by dllo on 15/12/7.
//  Copyright © 2015年 张维扬. All rights reserved.
//

#import "ErCodeViewController.h"
#import "QRCodeGenerator.h"

@interface ErCodeViewController ()

@end

@implementation ErCodeViewController
- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"扫一扫";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleDone target:self action:@selector(turnBuck)];
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor blackColor];
    [self creatViews];
}
- (void)creatViews
{
    
    UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(25, 100, ScreenWidth - 50, ScreenWidth - 50)];
    UIImage *img = [QRCodeGenerator qrImageForString:@"面包旅行" imageSize:200.0];
    imageV.image = img;
    [self.view addSubview:imageV];
    
    UILabel *focusLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, ScreenWidth + 60, ScreenWidth, 30)];
    focusLabel.text = @"扫一扫  关注我们";
    focusLabel.textAlignment = 1;
    [self.view addSubview:focusLabel];
}
- (void)turnBuck
{
    [self.navigationController popViewControllerAnimated:YES];
}@end
